package com.heima.d4prac;

import org.junit.jupiter.api.Test;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Scanner;

public class JUnitTest {
    int num=10;
    @Test
    public void test(){
        System.out.println("hello");
    }
    @Test
     public void test1(){
        System.out.println("hello1");
        System.out.println(num);
    }
    @Test
    public void test2(){
        System.out.println(getNum());
    }
    public int getNum(){
        return num;
    }
    @Test
    public void test3(){
        StringBuilder sb = new StringBuilder("a");

        sb.append("b");

        sb.append("c");

        sb.append("ddd");

        sb.append("e");

        System.out.println(sb.length());
    }
    @Test
    public void test4(){
        Double d=15.0;
        System.out.println(d.getClass().getSuperclass().getSuperclass());
        double d1=d;
        Double v = Double.valueOf("3.14");
        double d2=v;
        double v1 = Double.parseDouble("3.14");
        String s = String.valueOf(v1);
    }
    @Test
    public void test5(){
//        ArrayList<String> list = new ArrayList<>();
//        String s="abc";
//        list.add(s);
//        System.out.println(list.getFirst());
        Integer a=1;
        Integer b=1;
        System.out.println(a==b);
        Integer x=128;
        Integer y=128;
        System.out.println(x==y);

    }

}
